class TimeLog < ActiveRecord::Base
      belongs_to :user
      belongs_to :project
      belongs_to :activity_type
      belongs_to :todo
      belongs_to :todo_item
def confirmed_user
  User.find(self.confirmed_by) if self.confirmed_by 
end
def is_deleteable?(u)
  if self.user == u and self.confirmed != 1
    true
  else
    false
  end
end
def is_confirmable?(u)
  if self.project.user_is_manager?(u.id) and self.confirmed != 1
    true
  else
    false
  end
end
end
